﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Windows.Input;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    public partial class TGTTVA06
    {

        public TGTTVA06()
        {

            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VVAART();
            this.DataContext = MV;
            InitializeComponent();

        }
        public override void QueryCommand(object sender, RoutedEventArgs e)
        {
            base.QueryCommand(sender, e);

        }
        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            DataSet Set = new DataSet();
            DataTable tb = TBMain.Clone();
            string sind = "", ART = "";
            if (dwMaster == null)
                return;


            ART = dwMaster["VAADART"].ToString();
            dwData = TMV.VWS.TBMain.NewRow();
            dwData["WAMANDANT"] = app.Mandant;
            dwData["WAART"] = ART;
            SResult = TMV.VWS.QueryWASTAMM(dwData, 12);
            Set.Merge(SResult);

            tb.TableName = "VAART";
            Set.Merge(tb);
            cDR.DocType = VALBTYP;
            cDR.PRINT(Set);
        }
        private void btnPrintVA06_Click(object sender, RoutedEventArgs e)
        {
            DataSet Set = new DataSet();
            DataTable tb = TBMain.Clone();
            string sind = "", ART = "";
            Set.Merge(TMV.SetProd);
            cDRVA06.PRINT(Set);
        } 
    }
}
